import Vue from 'vue'

import App from './App.vue'
import router from './router'
import directives from './directives'
import { createPinia, PiniaVuePlugin } from 'pinia'

import './style/layout.scss'

import './plugins/elementui'
import 'element-ui/lib/theme-chalk/index.css'

for (const key in directives) {
  if (Object.hasOwnProperty.call(directives, key)) {
    const elem = directives[key];
    Vue.directive(key, elem)
  }
}

Vue.use(PiniaVuePlugin)
const pinia = createPinia()

new Vue({
  pinia,
  router,
  render: (h) => h(App)
}).$mount('#app')
